package com.saiyaemon.blog.controller.manager;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.saiyaemon.blog.service.ArticleService;
import com.saiyaemon.blog.service.ArticleTagService;
import com.saiyaemon.blog.service.CategoryService;
import com.saiyaemon.blog.service.TagService;

@Controller
public class IntroductionController {

	@Autowired
	ArticleService articleService;

	@Autowired
	CategoryService categoryService;

	@Autowired
	ArticleTagService articleTagService;

	@Autowired
	TagService tagService;

	@RequestMapping(value = "/introduction", method = RequestMethod.GET)
	public ModelAndView showIndex(Integer pageNum, Integer pageSize, String title,HttpServletRequest request) {
		ModelAndView modelAndView = new ModelAndView("/manager/introduction");
		String userAgent = request.getHeader("user-agent");
		if(userAgent.contains("Android")||userAgent.contains("iPhone"))
			modelAndView.setViewName("/manager/introduction4");
		return modelAndView;
	}
}
